package com.zhny.dao;

import com.zhny.pojo.BUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;


public interface BackendUserDao extends Mapper<BUser> {

    @Select("select * from t_user where username=#{username}")
    BUser selectByName(String username);

    @Insert("insert into t_user_role(uid,rid) values(#{id},#{roleId})")
    void bindingUserAndRole(@Param("roleId") Integer roleId, @Param("id") Integer id);
}
